import math


class Solution:
    def closestDivisors(self, num: int) -> list:
        def func(num):
            n = math.sqrt(num)
            n = int(n)
            for i in range(n, 0, -1):
                div, mod = divmod(num, i)
                if mod != 0:
                    continue
                return (div, i)

        one1, one2 = func(num+1)
        two1, two2 = func(num+2)
        if abs(one1-one2) < abs(two1-two2):
            return [one1, one2]
        return [two1, two2]
